import { get } from "@/utils/request"

export default {
    namespaced: true,
    state: {
        categories: []
    },
    mutations: {
        refreshFindAllCategory(state,data) {
            state.categories = data
        }
    },
    actions: {
        // 分页查询所有新闻
        async findAllCategory({commit}) {
            let res = await get("/category/findAll");
            commit("refreshFindAllCategory",res.data)
        }
    }
}